<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin-Test-uploadify 上传测试页面</title>

<script language="javascript" src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
<script src="__PUBLIC__/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css">
<style type="text/css">
body {
	font: 13px Arial, Helvetica, Sans-serif;
}

</style>
</head>

<body>

<h1>Uploadify Demo</h1>
	<form>
		<div id="queue"></div>
		<input id="file_upload" name="file_upload" type="file" multiple="true">
	</form>

	<script type="text/javascript">
		<?php $timestamp = time();?>
		$(function() {
			$('#file_upload').uploadify({
				'formData'     : {
					'timestamp' : '<?php echo $timestamp;?>',
					'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
				},
				'swf'      : '__PUBLIC__/uploadify/uploadify.swf',
				'uploader' : '/index.php/Admins/Upload/uploadify',
				'checkScript'  : '/index.php/Admins/Upload/checkExists',
				'buttonText':'选择文件',
				'fileSizeLimit':1024,
				'fileTypeDesc' : 'Image Files',
				'fileTypeExts' : '*.gif; *.jpg; *.png; *.xls',
				
				'onUploadSuccess': function ( fileObj, response, data) {  
					　		alert("文件:" + fileObj.name + "上传成功");
					　},  
					　'onUploadError': function(event, queueID, fileObj) {  
					　		alert("文件:" + fileObj.name + "上传失败");  
					　},  
					　'onCancel': function(event, queueID, fileObj){  
					　		alert("取消了" + fileObj.name);  
					　　　} 
				
				
			});
		});
	</script>


</body>
</html>
